import 'package:flutter/material.dart';
import '../../widgets/AppColors.dart';

class OxidationItem extends StatelessWidget {
  final Map<String, dynamic> data;

  const OxidationItem({super.key, required this.data});

  @override
  Widget build(BuildContext context) {
    return Container(
      padding: const EdgeInsets.only(bottom: 10, top: 5),
      margin: const EdgeInsets.symmetric(vertical: 4.0, horizontal: 8.0),
      child: Row(
        mainAxisAlignment: MainAxisAlignment.spaceBetween,
        children: [
          Text(
            data['field01'].toString(),
            textAlign: TextAlign.left,
            style: TextStyle(fontSize: 15, color: AppColors.textSecondary),
          ),
          Text(
            '${data['burningLoss'].toStringAsFixed(2)}%',
            textAlign: TextAlign.center,
            style: TextStyle(fontSize: 15, color: AppColors.textSecondary),
          ),
          Text(
            '${data['decarburation'].toStringAsFixed(2)}%',
            textAlign: TextAlign.center,
            style: TextStyle(fontSize: 15, color: AppColors.textSecondary),
          ),
        ],
      ),
    );
  }
}
